home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / std_unix / archive / text0061.txt < prev    next >
Encoding:
Text File  |  1993-07-06  |  1.3 KB  |  31 lines

  1. Submitted-by: willcox@urbana.mcd.mot.com (David A Willcox)
  2.  
  3. bitbug@netcom.com (James Buster) writes:
  4.  
  5. >More importantly, the N argument signal handler (where N > 1) and
  6. >event handlers from 1003.4 destroy any hope of strict ANSI C
  7. >compatibility. It annoys me that the 1003.4 committee would
  8. >choose interfaces that require implementation-defined behavior
  9. >from the compiler/OS and therefore cannot be truly portable.
  10.  
  11. Read the standard.  There is no conflict with either POSIX.1 or ANSI
  12. C.  The 3-argument signal handler is not used with the ANSI signal()
  13. function; a signal handler established with signal() still gets only
  14. one argument.  You get three arguments only if you establish the
  15. handler using sigaction(), you set the SA_SIGINFO flag is sa_flags,
  16. and you use a field other than sa_handler in the sigaction struct.
  17. (My copy of the last draft isn't handy right now, and I don't remember
  18. the name of the new field.)  The new field has the appropriate
  19. definition for a 3-arg function.
  20.  
  21. There is no requirement for "implementation-defined" behavior to make
  22. this work.  It can be done portably.
  23.  
  24. David A. Willcox        "Just say 'NO' to universal drug testing"
  25. Motorola MCG - Urbana        UUCP: ...!uiucuxc!udc!willcox
  26. 1101 E. University Ave.        INET: willcox@urbana.mcd.mot.com
  27. Urbana, IL 61801        FONE: 217-384-8534
  28.  
  29. Volume-Number: Volume 31, Number 64
  30.  
  31.